@extends('mobile_end.layouts.base')

@section('default_style')
<!--<link rel="stylesheet" href="{{ asset('assets/jquery.mobile-1.4.5/jquery.mobile-1.4.5.css') }}">-->
<!--<script src="{{ asset('assets/jquery.min.js') }}"></script>-->
<!--<script src="{{ asset('assets/jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.js') }}"></script>-->
@stop
@section('default_container')
<div class="ui-toolbar user-header">
    <div class="ui-toolbar-wrap ui-navigator">
        <div class="ui-toolbar-left">
            <a class="button button-pill button-highlight" href="{{ URL::action('MobileIndexController@doRegister') }}" target="_self"><i class="icon-shopping-cart icon-x"></i> 注册</a>
        </div>
        <h2 class="ui-toolbar-title">华大餐饮点餐系统</h2>
    </div>
</div>
<ul class="user-form">
{{ Form::open(array('action' => 'MobileIndexController@doLogin')) }}
<!--<label>用户名</label><br/>-->
<input type="text" name="username" id="username" placeholder="用户名"/><br>
<!--<label>密码</label><br/>-->
<input type="password" name="password" id="password" placeholder="请输入密码"/>
<button type="submit" class="button button-pill button-action" id="submit">登录</button>
{{ Form::close() }}
</ul>
@if ($message = isset($error) ? $error : Session::get('error'))
<ul class="detail-list">
    @if(is_array($message))
    @foreach ($message as $m)
    <li class="ui-li-has-icon ui-btn ui-btn-up-c ui-btn-icon-right ui-li" data-theme="c">{{ $m }}</li>
    @endforeach
    @else
    <li class="ui-li-has-icon ui-btn ui-btn-up-c ui-btn-icon-right ui-li" data-theme="c">{{ $message }}</li>
    @endif
</ul>
@endif
<div style="height: 140px;"></div>
<div id="navbtn" class="footer ui-navigator">
    <ul>
        <li>Copy Right 2014 华丰国货</li>
    </ul>
</div>
@stop

@section('default_scripts')
<script>

    $('#navbtn').navigator();

    //plus事件处理
    if(window.plus){
        plusReady();
    }else{
        document.addEventListener("plusready",plusReady,false);
    }
  
    function plusReady(){
        // 关闭程序启动界面
        plus.navigator.closeSplashscreen();
    }
</script>
@stop